package demo.hms.RoomType.contoller;

import demo.hms.RoomType.service.servicelmpl.RoomTypeServicelmpl;
import demo.hms.mybatis.entity.RoomType;
import demo.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController()
@RequestMapping("/roomType")
public class RoomTypeController {
    @Resource
    private RoomTypeServicelmpl service;

    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    public Result selectAll(String roomTypeName){return service.selectAll(roomTypeName);}
    @RequestMapping(value = "/insert", method = RequestMethod.GET)
    public Result insert(RoomType roomType){return service.insert(roomType);}
    @RequestMapping(value = "/update", method = RequestMethod.GET)
    public Result update(RoomType roomType){return service.update(roomType);}
    @RequestMapping(value = "/delete", method = RequestMethod.GET)
    public Result delete(String roomTypeId){return service.delete(roomTypeId);}

}
